package com.yun.zf.common.app.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 租房维护表
 * </p>
 *
 * @author cj
 * @since 2021-03-09
 */
@TableName("zf_house_info_rent")
@Data
public class ZfHouseInfoRent implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @NotNull(message = "房源表id代码不能为空")
    @ApiModelProperty(value = "房源id")
    private Long basicId;


    @ApiModelProperty(value = "省级区划代码")
    @NotNull(message = "省级区划代码不能为空")
    private Long provinceCode;

    @ApiModelProperty(value = "城市编码")
    @NotNull(message = "城市编码不能为空")
    private Long cityCode;

    @ApiModelProperty(value = "是否首次出租0首次，1非首次")
    private Integer firstRental;

    @ApiModelProperty(value = "租期要求起期")
    @NotNull(message = "租期要求起期不能为空")
    private Integer leaseStart;

    @ApiModelProperty(value = "租期要求止期")
    @NotNull(message = "租期要求止期不能为空")
    private Integer leaseEnd;

    @ApiModelProperty(value = "租客要求，卖房不显示此项，上班族，仅限女生等")
    private String requirement;

    @ApiModelProperty(value = "附加要求")
    private String extraRequirement;


    @ApiModelProperty(value = "租期单位，月，年")
    @NotBlank(message = "单位不能为空")
    private String unit;

    @ApiModelProperty(value = "卧室类型 ，如果是合租必选 1主卧 ，2次卧")
    private Integer bedroomType;

    @ApiModelProperty(value = "选择合租，出租卧室是否有阳台")
    private String isBalcony;

    @ApiModelProperty(value = "选择合租，出租卧室是否有独卫")
    private String isToilet;

    /**
     * 出租方式1整租，2合租 如果第一个页面选择出租，则此处必选
     */
    @ApiModelProperty(value = "出租方式1整租，2合租 如果第一个页面选择出租，则此处必选")
    private int rentType;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime ;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifiedTime = new Date();
}
